﻿// <copyright file="GameChangedEventArgs.cs" company="SingularityShift">
// Copyright (c) 2009 SingularityShift.com
// </copyright>
// <author>Ben McClure</author>
// <email>ben@singularityshift.com</email>
// <date>2009-08-14</date>
// <summary>Contains arguments that give details about a GameChanged event</summary>
namespace GameLib.Games.Util
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    /// <summary>
    /// Specifies arguments to include with a GameChanged event to signify what in the game has changed.
    /// </summary>
    public class GameChangedEventArgs : GameComponentChangedEventArgs
    {
        /// <summary>
        /// Initializes a new instance of the GameChangedEventArgs class, specifying a <see cref="GameChangeType"/> signifying what has changed
        /// </summary>
        /// <param name="changeType">A <see cref="GameChangeType"/> enum indicating what type of change was made</param>
        public GameChangedEventArgs(GameChangeType changeType)
        {
            this.ChangeType = changeType;
        }
        
        /// <summary>
        /// Initializes a new instance of the GameChangedEventArgs class, specifying a <see cref="GameChangeType"/> signifying what
        /// has changed, as well as including an attached value
        /// </summary>
        /// <param name="changeType">A <see cref="GameChangeType"/> enum indicating what type of change was made
        /// </param>
        /// <param name="value">An object related to the change that was made</param>
        public GameChangedEventArgs(GameChangeType changeType, object value)
        {
            this.ChangeType = changeType;
            this.Value = value;
        }
        
        /// <summary>
        /// <para>Gets a ChangeType which indicates what type of change was made to the game.</para>
        /// <para>The ChangeType should always be specified, or the event would not help the caller very much.</para>
        /// </summary>
        public new GameChangeType ChangeType
        {
            get;
            private set;
        }
    }
}

